<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>日期输入框</title>
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.servletContext.contextPath}/jquery-easyui/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
  <script type="text/javascript">
    $(function () {
      $("#datebox").datebox({
        onSelect : function (date) {
          //记录原始值
          console.log($(this).datebox('getValue'));
          //获取并记录格式化后的新值
          var text = $.fn.datebox.defaults.formatter(date);
          console.log(text);
        }
      })
    })
  </script>
  <input type="text" class="easyui-datebox">
  <input type="text" id="datebox">
</body>
</html>